export function formatTime(val) {
  const newDate = new Date(val)
  const y = newDate.getFullYear()
  const m = (newDate.getMonth() + 1).toString().padStart(2, 0)
  const d = newDate.getDate().toString().padStart(2, 0)
  const h = newDate.getHours().toString().padStart(2, 0)
  const min = newDate.getMinutes().toString().padStart(2, 0)
  const s = newDate.getSeconds().toString().padStart(2, 0)
  return `${y}-${m}-${d} ${h}:${min}:${s}`
}
